import request from '@/utils/request'

// 查询比特币充值凭证列表
export function listCredits(query) {
  return request({
    url: '/system/credits/list',
    method: 'get',
    params: query
  })
}

// 查询比特币充值凭证详细
export function getCredits(id) {
  return request({
    url: '/system/credits/' + id,
    method: 'get'
  })
}

// 新增比特币充值凭证
export function addCredits(data) {
  return request({
    url: '/system/credits',
    method: 'post',
    data: data
  })
}

// 修改比特币充值凭证
export function updateCredits(data) {
  return request({
    url: '/system/credits',
    method: 'put',
    data: data
  })
}

// 删除比特币充值凭证
export function delCredits(id) {
  return request({
    url: '/system/credits/' + id,
    method: 'delete'
  })
}

export function recharge(data) {
  return request({
    url: '/system/credits/recharge',
    method: 'post',
    data: data
  })
}
